<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>GSoC2011SfM: D:/Travail/These/Determination caracteristiques camera/GSoC/SfM/src/PointsToTrack.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">GSoC2011SfM
   &#160;<span id="projectnumber">0.1</span>
   </div>
   <div id="projectbrief">Google Summer of Code 2011: Structure from motion</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">D:/Travail/These/Determination caracteristiques camera/GSoC/SfM/src/PointsToTrack.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef _GSOC_SFM_POINTS_TO_TRACK_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define _GSOC_SFM_POINTS_TO_TRACK_H 1</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &quot;macro.h&quot;</span> <span class="comment">//SFM_EXPORTS and remove annoying warnings</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &quot;opencv2/features2d/features2d.hpp&quot;</span>
<a name="l00008"></a>00008 
<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;config_SFM.h&quot;</span><span class="comment">//semaphore...</span>
<a name="l00010"></a>00010 
<a name="l00011"></a>00011 
<a name="l00012"></a>00012 <span class="keyword">namespace </span>OpencvSfM{
<a name="l00013"></a>00013   <span class="keyword">class </span>SFM_EXPORTS TrackOfPoints;
<a name="l00014"></a>00014 
<a name="l00025"></a><a class="code" href="class_opencv_sf_m_1_1_points_to_track.html">00025</a>   <span class="keyword">class </span>SFM_EXPORTS <a class="code" href="class_opencv_sf_m_1_1_points_to_track.html" title="This class can be used to store informations about point and features. This is an abstract class: you...">PointsToTrack</a>
<a name="l00026"></a>00026   {
<a name="l00027"></a>00027   <span class="keyword">protected</span>:
<a name="l00033"></a>00033     DECLARE_MUTEX(worker_exclusion);
<a name="l00038"></a><a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#a52d852bc3fa39c952405c55a8d1e378f">00038</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#a52d852bc3fa39c952405c55a8d1e378f">nb_workers_</a>;
<a name="l00043"></a><a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#a08c9523080571e71e30b11a2f8b9c6b9">00043</a>     std::vector&lt;cv::KeyPoint&gt; <a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#a08c9523080571e71e30b11a2f8b9c6b9">keypoints_</a>;
<a name="l00049"></a><a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#adcbf3783bdf4a2a1d3e10c4b74224899">00049</a>     cv::Mat <a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#adcbf3783bdf4a2a1d3e10c4b74224899">descriptors_</a>;
<a name="l00053"></a><a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#ae34562f2590efe81f5ce137ef011bd00">00053</a>     std::vector&lt;unsigned int&gt; <a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#ae34562f2590efe81f5ce137ef011bd00">RGB_values_</a>;
<a name="l00054"></a><a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#aa1ad5a647af1dd6583dbd780e94c089c">00054</a>     <span class="keywordtype">int</span> <a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#aa1ad5a647af1dd6583dbd780e94c089c" title="index of frame when available">corresponding_image_</a>;
<a name="l00055"></a><a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#abb10da9503a8ac931d9d167149309df3">00055</a>     <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#abb10da9503a8ac931d9d167149309df3" title="total numbers of images!">glob_number_images_</a>;
<a name="l00056"></a>00056 
<a name="l00062"></a><a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#add21f430e246d2176dee8a34d4b92ead">00062</a>     <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#add21f430e246d2176dee8a34d4b92ead">impl_computeKeypoints_</a>( ){<span class="keywordflow">return</span> 0;};
<a name="l00067"></a><a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#a086c4acf6884db7487eb05f9c3d996a3">00067</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#a086c4acf6884db7487eb05f9c3d996a3">impl_computeDescriptors_</a>( ){};
<a name="l00068"></a>00068 
<a name="l00069"></a>00069   <span class="keyword">public</span>:
<a name="l00076"></a>00076     <a class="code" href="class_opencv_sf_m_1_1_points_to_track.html" title="This class can be used to store informations about point and features. This is an abstract class: you...">PointsToTrack</a>( <span class="keywordtype">int</span> corresponding_image=-1, std::vector&lt;cv::KeyPoint&gt; keypoints=
<a name="l00077"></a>00077       std::vector&lt;cv::KeyPoint&gt;( 0 ), cv::Mat descriptors=cv::Mat( ) );
<a name="l00081"></a>00081     <span class="keyword">virtual</span> ~<a class="code" href="class_opencv_sf_m_1_1_points_to_track.html" title="This class can be used to store informations about point and features. This is an abstract class: you...">PointsToTrack</a>( <span class="keywordtype">void</span> );
<a name="l00085"></a>00085     <span class="keywordtype">void</span> free_descriptors();
<a name="l00086"></a>00086     
<a name="l00093"></a>00093     <span class="keywordtype">int</span> computeKeypointsAndDesc( <span class="keywordtype">bool</span> forcing_recalculation=<span class="keyword">false</span> );
<a name="l00098"></a>00098     <span class="keywordtype">int</span> computeKeypoints( );
<a name="l00102"></a>00102     <span class="keywordtype">void</span> computeDescriptors( );
<a name="l00109"></a>00109     <span class="keywordtype">void</span> addKeypoints( std::vector&lt;cv::KeyPoint&gt; keypoints,cv::Mat descriptors=cv::Mat( ),<span class="keywordtype">bool</span> computeMissingDescriptor=<span class="keyword">false</span> );
<a name="l00115"></a><a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#a076f28dac2b30dfcdb2097c496adfd9e">00115</a>     <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> addKeypoint( cv::KeyPoint point )
<a name="l00116"></a>00116     {keypoints_.push_back( point ); <span class="keywordflow">return</span> keypoints_.size( )-1;};
<a name="l00121"></a><a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#ab0ff4754d1e5c734521b5d46aef37c49">00121</a>     <span class="keyword">inline</span> <span class="keyword">const</span> std::vector&lt;cv::KeyPoint&gt;&amp; <a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#ab0ff4754d1e5c734521b5d46aef37c49">getKeypoints</a>( )<span class="keyword"> const </span>{<span class="keywordflow">return</span> keypoints_;};
<a name="l00129"></a>00129     <span class="keywordtype">void</span> getKeyMatches( <span class="keyword">const</span> std::vector&lt;TrackOfPoints&gt;&amp; matches, <span class="keywordtype">int</span> otherImage,
<a name="l00130"></a>00130       std::vector&lt;cv::Point2f&gt;&amp; pointsVals ) <span class="keyword">const</span>;
<a name="l00136"></a><a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#abb8a5af3e4d1e71900284a9e318bc316">00136</a>     <span class="keyword">inline</span> <span class="keyword">const</span> cv::KeyPoint&amp; getKeypoint( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index )<span class="keyword"> const</span>
<a name="l00137"></a>00137 <span class="keyword">    </span>{
<a name="l00138"></a>00138       CV_DbgAssert( index&lt;keypoints_.size( ) );
<a name="l00139"></a>00139       <span class="keywordflow">return</span> keypoints_[ index ];
<a name="l00140"></a>00140     };
<a name="l00145"></a><a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#a4ca955b907dee279030559d255a4e151">00145</a>     cv::Mat <a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#a4ca955b907dee279030559d255a4e151">getDescriptors</a>( )<span class="keyword"> const </span>{<span class="keywordflow">return</span> descriptors_;};
<a name="l00153"></a>00153     <span class="comment">//</span>
<a name="l00154"></a>00154     <span class="keywordtype">void</span> printPointsOnImage( <span class="keyword">const</span> cv::Mat &amp;image, cv::Mat&amp; outImg, <span class="keyword">const</span> cv::Scalar&amp; color=cv::Scalar::all( -1 ), <span class="keywordtype">int</span> flags=cv::DrawMatchesFlags::DEFAULT ) <span class="keyword">const</span>;
<a name="l00155"></a>00155 
<a name="l00161"></a><a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#afeff919bd2d785fb9e867e37e14b14d0">00161</a>     <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_opencv_sf_m_1_1_points_to_track.html#afeff919bd2d785fb9e867e37e14b14d0">getColor</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index )<span class="keyword"> const</span>{
<a name="l00162"></a>00162       <span class="keywordflow">if</span>( index&lt;RGB_values_.size() )
<a name="l00163"></a>00163         <span class="keywordflow">return</span> RGB_values_[index];
<a name="l00164"></a>00164       <span class="keywordflow">else</span>
<a name="l00165"></a>00165         <span class="keywordflow">return</span> 0;
<a name="l00166"></a>00166     }
<a name="l00167"></a>00167     
<a name="l00173"></a>00173     <span class="keyword">static</span> <span class="keywordtype">void</span> read( <span class="keyword">const</span> cv::FileNode&amp; node, <a class="code" href="class_opencv_sf_m_1_1_points_to_track.html" title="This class can be used to store informations about point and features. This is an abstract class: you...">PointsToTrack</a>&amp; points );
<a name="l00174"></a>00174     
<a name="l00180"></a>00180     <span class="keyword">static</span> <span class="keywordtype">void</span> write( cv::FileStorage&amp; fs, <span class="keyword">const</span> <a class="code" href="class_opencv_sf_m_1_1_points_to_track.html" title="This class can be used to store informations about point and features. This is an abstract class: you...">PointsToTrack</a>&amp; points );
<a name="l00181"></a>00181   };
<a name="l00182"></a>00182 }
<a name="l00183"></a>00183 <span class="comment">/*</span>
<a name="l00185"></a>00185 <span class="comment">static inline void cv::write( cv::FileStorage&amp; fs, const std::string&amp; name,</span>
<a name="l00186"></a>00186 <span class="comment">  const OpencvSfM::PointsToTrack&amp; points )</span>
<a name="l00187"></a>00187 <span class="comment">{</span>
<a name="l00188"></a>00188 <span class="comment">  OpencvSfM::PointsToTrack::write( fs,points );</span>
<a name="l00189"></a>00189 <span class="comment">};</span>
<a name="l00191"></a>00191 <span class="comment">static inline void cv::read( const cv::FileNode&amp; node, OpencvSfM::PointsToTrack&amp; points, </span>
<a name="l00192"></a>00192 <span class="comment">  OpencvSfM::PointsToTrack defaultValue = OpencvSfM::PointsToTrack( ) )</span>
<a name="l00193"></a>00193 <span class="comment">{</span>
<a name="l00194"></a>00194 <span class="comment">  OpencvSfM::PointsToTrack::read( node,points );</span>
<a name="l00195"></a>00195 <span class="comment">}</span>
<a name="l00196"></a>00196 <span class="comment">*/</span>
<a name="l00197"></a>00197 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Sun Aug 21 2011 16:45:52 for GSoC2011SfM by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
